sgdk
|
00001 00010 #ifndef _TOOLS_H_ 00011 #define _TOOLS_H_ 00012 00013 #include "bmp.h" 00014 #include "vdp_tile.h" 00015 #include "vdp_bg.h" 00016 00017 00022 #define COMPRESSION_NONE 0 00023 00027 #define COMPRESSION_APLIB 1 00028 00029 // * \def COMPRESSION_LZKN 00030 // * Use Konami (lzkn1_pack) compression scheme. 00031 // */ 00032 //#define COMPRESSION_LZKN 2 00037 #define COMPRESSION_RLE 3 00038 00042 #define COMPRESSION_MAP_RLE 4 00043 00044 00052 u32 getFPS(); 00060 fix32 getFPS_f(); 00061 00062 00067 void KLog(char* text); 00068 void KLog_U1(char* t1, u32 v1); 00069 void KLog_U2(char* t1, u32 v1, char* t2, u32 v2); 00070 void KLog_U3(char* t1, u32 v1, char* t2, u32 v2, char* t3, u32 v3); 00071 void KLog_U4(char* t1, u32 v1, char* t2, u32 v2, char* t3, u32 v3, char* t4, u32 v4); 00072 void KLog_U1x(u16 minSize, char* t1, u32 v1); 00073 void KLog_U2x(u16 minSize, char* t1, u32 v1, char* t2, u32 v2); 00074 void KLog_U3x(u16 minSize, char* t1, u32 v1, char* t2, u32 v2, char* t3, u32 v3); 00075 void KLog_U4x(u16 minSize, char* t1, u32 v1, char* t2, u32 v2, char* t3, u32 v3, char* t4, u32 v4); 00076 void KLog_S1(char* t1, s32 v1); 00077 void KLog_S2(char* t1, s32 v1, char* t2, s32 v2); 00078 void KLog_S3(char* t1, s32 v1, char* t2, s32 v2, char* t3, s32 v3); 00079 void KLog_S4(char* t1, s32 v1, char* t2, s32 v2, char* t3, s32 v3, char* t4, s32 v4); 00080 void KLog_S1x(u16 minSize, char* t1, s32 v1); 00081 void KLog_S2x(u16 minSize, char* t1, s32 v1, char* t2, s32 v2); 00082 void KLog_S3x(u16 minSize, char* t1, s32 v1, char* t2, s32 v2, char* t3, s32 v3); 00083 void KLog_S4x(u16 minSize, char* t1, s32 v1, char* t2, s32 v2, char* t3, s32 v3, char* t4, s32 v4); 00084 void KLog_f1(char* t1, fix16 v1); 00085 void KLog_f2(char* t1, fix16 v1, char* t2, fix16 v2); 00086 void KLog_f3(char* t1, fix16 v1, char* t2, fix16 v2, char* t3, fix16 v3); 00087 void KLog_f4(char* t1, fix16 v1, char* t2, fix16 v2, char* t3, fix16 v3, char* t4, fix16 v4); 00088 void KLog_f1x(s16 numDec, char* t1, fix16 v1); 00089 void KLog_f2x(s16 numDec, char* t1, fix16 v1, char* t2, fix16 v2); 00090 void KLog_f3x(s16 numDec, char* t1, fix16 v1, char* t2, fix16 v2, char* t3, fix16 v3); 00091 void KLog_f4x(s16 numDec, char* t1, fix16 v1, char* t2, fix16 v2, char* t3, fix16 v3, char* t4, fix16 v4); 00092 void KLog_F1(char* t1, fix32 v1); 00093 void KLog_F2(char* t1, fix32 v1, char* t2, fix32 v2); 00094 void KLog_F3(char* t1, fix32 v1, char* t2, fix32 v2, char* t3, fix32 v3); 00095 void KLog_F4(char* t1, fix32 v1, char* t2, fix32 v2, char* t3, fix32 v3, char* t4, fix32 v4); 00096 void KLog_F1x(s16 numDec, char* t1, fix32 v1); 00097 void KLog_F2x(s16 numDec, char* t1, fix32 v1, char* t2, fix32 v2); 00098 void KLog_F3x(s16 numDec, char* t1, fix32 v1, char* t2, fix32 v2, char* t3, fix32 v3); 00099 void KLog_F4x(s16 numDec, char* t1, fix32 v1, char* t2, fix32 v2, char* t3, fix32 v3, char* t4, fix32 v4); 00100 00101 00114 Bitmap *allocateBitmap(const Bitmap *bitmap); 00128 TileSet *allocateTileSet(const TileSet *tileset); 00141 Map *allocateMap(const Map *map); 00154 Image *allocateImage(const Image *image); 00155 00170 Bitmap *unpackBitmap(const Bitmap *src, Bitmap *dest); 00185 TileSet *unpackTileSet(const TileSet *src, TileSet *dest); 00200 Map *unpackMap(const Map *src, Map *dest); 00215 Image *unpackImage(const Image *src, Image *dest); 00216 00233 void unpack(u16 compression, u8 *src, u8 *dest); 00234 00246 u32 aplib_unpack(u8 *src, u8 *dest); 00258 u32 lzkn_unpack(u8 *src, u8 *dest); 00268 void rle4b_unpack(u8 *src, u8 *dest); 00278 void rlemap_unpack(u8 *src, u8 *dest); 00288 void rle4b_unpackVRam(u8 *src, u16 dest); 00289 00290 #endif // _TOOLS_H_